import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main1(String[] args) {
        MyQueue queue=new MyQueue();
        //入队列
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        //出队列
        System.out.println(queue.poll());
        //瞄一眼
        System.out.println(queue.peek());
        System.out.println(queue.peek());
        //判空
        System.out.println(queue.isEmpty());

    }

    public static void main(String[] args) {
        Deque<Integer> queue= new LinkedList<>();//链式实现
        queue.offerFirst(1);//头插
        queue.offer(2);//默认是尾插
        queue.pollFirst();//头删

        Deque<Integer> queue2=new ArrayDeque<>();//线性实现
    }
}
